var windowName = "siteMatterLog";
var Page
apiready = function(){
    onWindowShow(function () {
        // var cur = getLocData("curSite")
        // Page.curSite = cur;
        getData(Page)
    })
    onWindowHide(function () {
    })
    Page = createVM("#Page",{
        //页面数据
        item:{},
        list:[]
        ,num:""
    },{
        //页面方法
        init:function () {
            var data = getData4Page()
            logJson(data)
            this.item = data.item
        }
        ,OnPullDownRefresh:function () {
            startPullDownRefresh()
            // getData(this)
        },
        getIt: function () {
            var item = this.item
            var num = this.num
            apiGet("/app/site/matter/add/log",{id:item.id,num:num},function (res) {
                getData(Page)
                log(res.data)
            })
        }
    })

    Page.init()

}

function getData(_this) {
    startPullDownRefresh()
    apiGet("/app/site/matter/get/log",{id:_this.item.id},function (res) {
        stopPullDownRefresh()
        _this.list = res.data
        log(res.data)
    })
}